import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import HelloWorld from 'views/HelloWorld.vue'
import HomePageVue from '../views/HomePage.vue'
import LayoutVue from 'src/components/Layout.vue'
import LasLoader from 'src/views/LasLoader.vue'


export const xeokitDemoRoutes: RouteRecordRaw[] = [
  {
    path: '/hello_world',
    name: 'HelloWrold',
    component: HelloWorld
  },
  {
    path: '/las_loader',
    name: 'LasLoader',
    component: LasLoader
  }
]

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    name: 'Home',
    component: HomePageVue
  },

  {
    path: '/layout',
    name: 'Layout',
    component: LayoutVue,
    children: xeokitDemoRoutes
  }
]


const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes
})

export default router